package com.ddstation.crm.organization_structure.mapper;

import com.ddstation.crm.organization_structure.entity.DtInvsOrganizationStructureStaffEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface DtInvsOrganizationStructureStaffMapper {
	List<DtInvsOrganizationStructureStaffEntity> select(@Param("orgIdArray") List<Integer> orgIdArray, @Param("name") String name);
//	List<DtInvsOrganizationStructureStaffEntity> selectByName(@Param("orgIdArray")List<Integer> orgIdArray, @Param("name")String name);
	DtInvsOrganizationStructureStaffEntity selectByPK(@Param("orgId") int orgId, @Param("doctorId") int doctorId);
	DtInvsOrganizationStructureStaffEntity selectByDoctorId(@Param("doctorId") Integer doctorId);
	int selectOrgIdByDoctorId(@Param("doctorId") Integer doctorId);
	List<DtInvsOrganizationStructureStaffEntity> selectStaffInInstitution(@Param("institutionId") String institutionId, @Param("doctorId") int doctorId);
	int insert(@Param("orgId") int orgId, @Param("doctorId") String doctorId, @Param("isManager") int isManager);
	int update(@Param("orgId") int orgId, @Param("doctorId") int doctorId, @Param("isManager") int isManager);
	int delete(@Param("orgId") int orgId, @Param("doctorId") int doctorId);
	int deleteByDoctorId(@Param("doctorId") int doctorId);
	/**
	 * 指定组织id的doctorid 释放
	 * @param doctorId
	 * @param orgIdArray
	 * @return
	 */
	int release(@Param("doctorId") String doctorId, @Param("orgIdArray") List<Integer> orgIdArray);
}